<template>
  <view class="page">
    <!-- 顶部导航 -->
    <ob-navbar title="系统设置" :show-back="true" :prevent-default-back="true" @left-click="backToProfile" />

    <!-- 内容区域：按需继续扩展 -->
    <view class="content">
      <view class="cell" @click="clearCache">
        <text class="cell-text">清理缓存</text>
        <text class="arrow">></text>
      </view>
      <view class="cell" @click="checkUpdate">
        <text class="cell-text">检查更新</text>
        <text class="arrow">></text>
      </view>
    </view>
  </view>
</template>

<script setup>
// 简单交互示例：后续可接入真实逻辑
const clearCache = () => {
  try { uni.clearStorageSync() } catch (e) {}
  uni.showToast({ title: '缓存已清理', icon: 'none' })
}
const checkUpdate = () => {
  uni.showToast({ title: '已是最新版本', icon: 'none' })
}
//  
const backToProfile = () => {
  uni.switchTab({ url: '/pages/profile/index' })
}
</script>

<style scoped>
.page { min-height: 100vh; background: #F5F5F5; }
.content { margin: 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.cell { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #F0F0F0; }
.cell:last-child { border-bottom: none; }
.cell-text { font-size: 15px; color: #333; }
.arrow { color: #C0C0C0; }
</style>

